package com.study.design.pattern.pattern.creational.singleton.serializebreak;

import java.io.Serializable;

/**
 * @Author: gongsl
 * @Date: 2025-02-23 15:06
 * @description:
 */
public class HungrySingleton implements Serializable {
    private static final HungrySingleton INSTANCE = new HungrySingleton();

    private HungrySingleton() {
        // 私有构造函数
    }

    public static HungrySingleton getInstance() {
        return INSTANCE;
    }

    public Object readResolve() {
        return INSTANCE;
    }
}
